package com.chanzany.srb.core.pojo.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.chanzany.srb.core.pojo.entity.Dict;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author ChanZany
 * @Date 2021/4/13 10:07
 * @Version 1.0
 */
@Data
@NoArgsConstructor
public class ExcelDictDTO {
    @ExcelProperty("id")
    private Long id;

    @ExcelProperty("上级id")
    private Long parentId;

    @ExcelProperty("名称")
    private String name;

    @ExcelProperty("值")
    private Integer value;

    @ExcelProperty("编码")
    private String dictCode;

    public ExcelDictDTO(Dict dict){
        this.id = dict.getId();
        this.parentId = dict.getParentId();
        this.name = dict.getName();
        this.value = dict.getValue();
        this.dictCode = dict.getDictCode();
    }
}
